<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<style>
    #testDiv::before {
        background-image: url(http://dummy/bg.svg#frag1);
    }
    #testDiv::after {
        background-image: url(http://dummy/bg.svg#frag2);
    }
</style>
<div id="testDiv"></div>
<script>
test(() => {
    assert_equals(getComputedStyle(testDiv, "::before").backgroundImage, 'url("http://dummy/bg.svg#frag1")', "Computed backgroundImage of #testDiv::before.");
    assert_equals(getComputedStyle(testDiv, "::after").backgroundImage, 'url("http://dummy/bg.svg#frag2")', "Computed backgroundImage of #testDiv::after.");
}, "Computed background-image of generated content contains correct fragment identifier.");
</script>
